<?php
/**
 * Created by PhpStorm.
 * User: zouhua
 * Date: 2017/6/20
 * Time: 21:34
 */

namespace app\controllers;


use app\components\WebController;
use app\models\User;

class CompanyController extends WebController {

    public function actionIndex() {
        $uid = intval($this->get('uid', 0));
        $user = User::findOne($uid);
        if (!$user || $user->getIsStudent()) {
            return $this->redirect(['/']);
        }

        $this->view->title = '公司简介';
        return $this->render(compact('user'));
    }
}